import {userRoundIdx, initUserRoundIdx} from '~/utils/const';

export const departmentKey = 'department';
export const gradeKey = 'grade';
export const subjectKey = 'subject_id';

export const searchConfig = [
    {
        type: 'select',
        key: departmentKey,
        label: '学部',
        unitId: 'Renewal_Overview_partOne_select',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: gradeKey,
        label: '年级',
        unitId: 'Renewal_Overview_partOne_select',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: subjectKey,
        label: '学科',
        unitId: 'Renewal_Overview_partOne_select',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    }
];

export const initialValues = {
    [departmentKey]: '全部',
    [gradeKey]: '全部',
    [subjectKey]: '全部',
};

export const dIdConfig = {
    part1: {
        dId: 'Renewal_Overview_partTwo_Total_Renewal_Degree',
        unitId: 'Renewal_Overview_partTwo_Total_Renewal_Degree_composite'
    },
    part2: {
        dId: 'Renewal_Overview_partThree_Department_Total_Renewal_Percentage',
        unitId: 'Renewal_Overview_partThree_Department_Total_Renewal_Percentage_composite'
    },
    part3: {
        dId: 'Renewal_Overview_partThree_Department_Renewal_Extension_Transformation',
        unitId: 'Renewal_Overview_partThree_Department_Renewal_Extension_Transformation_composite'
    },
    part4: {
        dId: 'DepartmentDimensionReport_PartThree',
        unitId: 'DepartmentDimensionReport_PartThree_excel'
    },
    part5: {
        dId: 'DepartmentDimensionReport_PartFour',
        unitId: 'DepartmentDimensionReport_PartFour_excel'
    },
    part6: {
        dId: 'Renewal_Overview_partFive_Center_Total_Renewal_Accomplished_Percentage',
        unitId: 'Renewal_Overview_partFive_Center_Total_Renewal_Accomplished_Percentage_composite'
    },
    part7: {
        dId: 'Renewal_Overview_partFive_Area_Renewal_Extension_Transformation',
        unitId: 'Renewal_Overview_partFive_Area_Renewal_Extension_Transformation_composite'
    },
    part8: {
        dId: 'Renewal_Overview_partSix_Center_Original_Student_transformation',
        unitId: 'Renewal_Overview_partSix_Center_Original_Student_transformation_composite'
    },
};

// 四个卡片
export const cardsConfig = [
    {
        id: 'Renewal_Overview_partOne_Renewal_Number',
        unitId: 'Renewal_Overview_partOne_Renewal_Number_card_1',
    },
    {
        id: 'Renewal_Overview_partOne_Total_Renewal_Percentage',
        unitId: 'Renewal_Overview_partOne_Total_Renewal_Percentage_card_1',
        isRatio: true
    },
    {
        id: 'Renewal_Overview_partOne_Accomplished_Percentage',
        unitId: 'Renewal_Overview_partOne_Accomplished_Percentage_card_1',
        isRatio: true
    },
    {
        id: 'Renewal_Overview_partOne_Total_Renewal_Money',
        unitId: 'Renewal_Overview_partOne_Total_Renewal_Money_card_1',
    },
    {
        id: 'Renewal_Overview_partOne_Renewal_Ratio',
        unitId: 'Renewal_Overview_partOne_Renewal_Ratio_card',
        isRatio: true
    },
    {
        id: 'Renewal_Overview_partOne_Renewal_Target_Ratio',
        unitId: 'Renewal_Overview_partOne_Renewal_Target_Ratio_card',
        isRatio: true
    },
];

export const initDimensionAndValues = [
    {
        dimensionId: `Renewal_Overview_partOne_select_${userRoundIdx}`,
        dimensionName: userRoundIdx,
        // 一轮班 1 二轮班 2
        value: [initUserRoundIdx]
    }
];
